package com.wissen.inharitance;
import java.io.*;
/**
 * @author wissen16
 * Student class implements classroom interface having rollno,name attributes
 * and get,print student informations methods
 */
abstract public  class Student implements classroom {       //Abstraction
	private int roll_no;          //Data Encapsulation
	private String sname;
	protected BufferedReader in=new BufferedReader(new InputStreamReader(System.in));;
	/**
	 * this method to read student inforamtion
	 */
	public void get_stud() {
		try	{
	System.out.print("Enter Student Roll No:");
	roll_no=Integer.parseInt(in.readLine());
	System.out.print("Enter Student's Name:");
	sname=in.readLine();
		}
		catch(Exception ex) {
			System.out.println(ex.getMessage());  
		}
	}
	/**
	 * this method to read student inforamtion
	 */
 	public void print_stud() {
	System.out.println("Student Roll No:"+roll_no);
	System.out.println("student Name:"+sname);
	}
}
